
//
//  NoDataView.m
//  BusinessMarket
//
//  Created by Michael Li on 2019/1/7.
//  Copyright © 2019年 Michael Li. All rights reserved.
//

#import "NoDataView.h"
@interface NoDataView ()
@property(nonatomic,strong) UIImageView *iv;
@property(nonatomic,strong) UIButton *btn;
@end
@implementation NoDataView
-(instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        self.iv = [[UIImageView alloc]initWithFrame:self.bounds];
        [self addSubview:self.iv];
        self.iv.image = [UIImage imageNamed:@"刷新页面"];
        self.btn = [[UIButton alloc]initWithFrame:self.bounds];
        [self addSubview:self.btn];
        [self.btn addTarget: self action:@selector(clickBtn:) forControlEvents:UIControlEventTouchUpInside];
    }
    return self;
}
-(void)clickBtn:(UIButton *)clickBtn
{
    if ([self.delegate respondsToSelector:@selector(noDataView:withReloadData:)]) {
        [self.delegate noDataView:self withReloadData:clickBtn];
    }
}
@end
